package com.offcn.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author mojiayi
 * @date 2021-03-23 17:00
 * @description
 */

@Controller
public class FirstThymeleafController {

    /**
     * 访问http://localhost:8080/first
     * 将数据message填充到templates/index.html
     * @param model
     * @return
     */

    @GetMapping("/index")
    public  String index(Model model){
        model.addAttribute("message","hello Thymeleaf !");
        System.out.println("===================================");
        return "index";
    }


}
